using System.Web.UI;

using OpenNetCommerce.Localization;

[assembly: TagPrefix("MettleSystems.dashCommerce.Controls", "dashCommerce")]
namespace MettleSystems.dashCommerce.Controls
{
	/// <summary>
	/// Localizable Hyperlink control.
	/// </summary>
	[ToolboxData("<{0}:HyperLink ID=\"HyperLinkId\" runat=\"server\" />")]
	public class HyperLink : System.Web.UI.WebControls.HyperLink
	{

		protected override void Render(HtmlTextWriter writer)
		{
			if (!string.IsNullOrEmpty(this.ID) && this.Text.Length == 0 && this.Controls.Count == 0) {
				this.Text = LocalizationUtility.GetText(this.ID);
			}
			base.Render(writer);
		}

	}
}